[Images] Partially update image metadata
curl --request PATCH \
--url https://api.onetsolutions.net/v1/organizations/{organization_id}/projects/{project_id}/compute/images/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"slug": "<string>",
"description": "<string>",
"os_name": "<string>",
"os_version": "<string>",
"os_architecture": "<string>",
"is_active": true,
"is_featured": true,
"min_disk_gb": 2147483647,
"min_ram_mb": 2147483647
}
'import requests
url = "https://api.onetsolutions.net/v1/organizations/{organization_id}/projects/{project_id}/compute/images/{id}"
payload = {
"name": "<string>",
"slug": "<string>",
"description": "<string>",
"os_name": "<string>",
"os_version": "<string>",
"os_architecture": "<string>",
"is_active": True,
"is_featured": True,
"min_disk_gb": 2147483647,
"min_ram_mb": 2147483647
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
slug: '<string>',
description: '<string>',
os_name: '<string>',
os_version: '<string>',
os_architecture: '<string>',
is_active: true,
is_featured: true,
min_disk_gb: 2147483647,
min_ram_mb: 2147483647
})
};
fetch('https://api.onetsolutions.net/v1/organizations/{organization_id}/projects/{project_id}/compute/images/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.onetsolutions.net/v1/organizations/{organization_id}/projects/{project_id}/compute/images/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'name' => '<string>',
'slug' => '<string>',
'description' => '<string>',
'os_name' => '<string>',
'os_version' => '<string>',
'os_architecture' => '<string>',
'is_active' => true,
'is_featured' => true,
'min_disk_gb' => 2147483647,
'min_ram_mb' => 2147483647
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.onetsolutions.net/v1/organizations/{organization_id}/projects/{project_id}/compute/images/{id}"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"slug\": \"<string>\",\n \"description\": \"<string>\",\n \"os_name\": \"<string>\",\n \"os_version\": \"<string>\",\n \"os_architecture\": \"<string>\",\n \"is_active\": true,\n \"is_featured\": true,\n \"min_disk_gb\": 2147483647,\n \"min_ram_mb\": 2147483647\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.patch("https://api.onetsolutions.net/v1/organizations/{organization_id}/projects/{project_id}/compute/images/{id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"slug\": \"<string>\",\n \"description\": \"<string>\",\n \"os_name\": \"<string>\",\n \"os_version\": \"<string>\",\n \"os_architecture\": \"<string>\",\n \"is_active\": true,\n \"is_featured\": true,\n \"min_disk_gb\": 2147483647,\n \"min_ram_mb\": 2147483647\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.onetsolutions.net/v1/organizations/{organization_id}/projects/{project_id}/compute/images/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"slug\": \"<string>\",\n \"description\": \"<string>\",\n \"os_name\": \"<string>\",\n \"os_version\": \"<string>\",\n \"os_architecture\": \"<string>\",\n \"is_active\": true,\n \"is_featured\": true,\n \"min_disk_gb\": 2147483647,\n \"min_ram_mb\": 2147483647\n}"
response = http.request(request)
puts response.read_bodyCompute
[Images] Partially update image metadata
Partially update the metadata of a private image. Only provided fields will be updated.
PATCH
/
v1
/
organizations
/
{organization_id}
/
projects
/
{project_id}
/
compute
/
images
/
{id}
[Images] Partially update image metadata
curl --request PATCH \
--url https://api.onetsolutions.net/v1/organizations/{organization_id}/projects/{project_id}/compute/images/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"slug": "<string>",
"description": "<string>",
"os_name": "<string>",
"os_version": "<string>",
"os_architecture": "<string>",
"is_active": true,
"is_featured": true,
"min_disk_gb": 2147483647,
"min_ram_mb": 2147483647
}
'import requests
url = "https://api.onetsolutions.net/v1/organizations/{organization_id}/projects/{project_id}/compute/images/{id}"
payload = {
"name": "<string>",
"slug": "<string>",
"description": "<string>",
"os_name": "<string>",
"os_version": "<string>",
"os_architecture": "<string>",
"is_active": True,
"is_featured": True,
"min_disk_gb": 2147483647,
"min_ram_mb": 2147483647
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
slug: '<string>',
description: '<string>',
os_name: '<string>',
os_version: '<string>',
os_architecture: '<string>',
is_active: true,
is_featured: true,
min_disk_gb: 2147483647,
min_ram_mb: 2147483647
})
};
fetch('https://api.onetsolutions.net/v1/organizations/{organization_id}/projects/{project_id}/compute/images/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.onetsolutions.net/v1/organizations/{organization_id}/projects/{project_id}/compute/images/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'name' => '<string>',
'slug' => '<string>',
'description' => '<string>',
'os_name' => '<string>',
'os_version' => '<string>',
'os_architecture' => '<string>',
'is_active' => true,
'is_featured' => true,
'min_disk_gb' => 2147483647,
'min_ram_mb' => 2147483647
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.onetsolutions.net/v1/organizations/{organization_id}/projects/{project_id}/compute/images/{id}"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"slug\": \"<string>\",\n \"description\": \"<string>\",\n \"os_name\": \"<string>\",\n \"os_version\": \"<string>\",\n \"os_architecture\": \"<string>\",\n \"is_active\": true,\n \"is_featured\": true,\n \"min_disk_gb\": 2147483647,\n \"min_ram_mb\": 2147483647\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.patch("https://api.onetsolutions.net/v1/organizations/{organization_id}/projects/{project_id}/compute/images/{id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"slug\": \"<string>\",\n \"description\": \"<string>\",\n \"os_name\": \"<string>\",\n \"os_version\": \"<string>\",\n \"os_architecture\": \"<string>\",\n \"is_active\": true,\n \"is_featured\": true,\n \"min_disk_gb\": 2147483647,\n \"min_ram_mb\": 2147483647\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.onetsolutions.net/v1/organizations/{organization_id}/projects/{project_id}/compute/images/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"slug\": \"<string>\",\n \"description\": \"<string>\",\n \"os_name\": \"<string>\",\n \"os_version\": \"<string>\",\n \"os_architecture\": \"<string>\",\n \"is_active\": true,\n \"is_featured\": true,\n \"min_disk_gb\": 2147483647,\n \"min_ram_mb\": 2147483647\n}"
response = http.request(request)
puts response.read_bodyAuthorizations
Use Authorization: Bearer <token> header. Token can be a JWT token or an API key (format: sk-onetsolutions-...).
Path Parameters
Unique identifier of the image.
Unique identifier of the organization that owns the resource.
Unique identifier of the project containing the resource.
Body
application/json
Ex: Ubuntu 22.04 LTS, Debian 12
Maximum string length:
255Ex: ubuntu-22-04, debian-12
Maximum string length:
50Pattern:
^[-a-zA-Z0-9_]+$Public images are available to all, private to organization only
public- Publicprivate- Private
Available options:
public, private Ex: Ubuntu, Debian, CentOS
Maximum string length:
100Ex: 22.04, 12, 8
Maximum string length:
50Ex: x86_64, aarch64
Maximum string length:
20Featured public images
Minimum disk size required (GB)
Required range:
0 <= x <= 4294967295Minimum RAM required (MB)
Required range:
0 <= x <= 4294967295Response
Image updated successfully
⌘I

